#pragma once

#include "CoreMinimal.h"
#include "IDetailsView.h"
#include "IStructureDetailsView.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SCompoundWidget.h"
#include "Cache/InputConfigureCacheEditor.h"


DECLARE_DELEGATE_OneParam(FOnNameChanged, FString);

class SConfigureDetailsView : public SCompoundWidget
{

public:
	SLATE_BEGIN_ARGS(SConfigureDetailsView)
	{
	}
	SLATE_EVENT(FOnNameChanged, NameChanged)
		SLATE_END_ARGS()


public:
	void Construct(const FArguments& InArgs);
private:
	TSharedPtr<IStructureDetailsView> SettingsView;
	TSharedPtr<FInputConfigureGroupData> ConfigureSettingBase;

	void CreateDetailView();
	void ValueChangedEvent(const FPropertyChangedEvent& pce);
	
	FOnNameChanged NameChanged;
public:
	void UpdateDetailView(FString inGroupKey);
	void ResetGroupKey(FString inGroupKey);
	FString GetGroupKey();
	TSharedPtr<FInputConfigureGroupData> GetGroup();
};